package com.imooc.springcloud;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

/**
 * @author caryguan
 * @version V1.0
 * @Package com.imooc.springcloud
 * @date 2020/10/19 12:15
 */

@SpringBootApplication
@EnableEurekaServer//启动eureka服务,改启动类就会被识别为eureka注册中心
public class EurekaServerApplication {

    public static void main(String[] args) {
        //以web形式启动
        new SpringApplicationBuilder(EurekaServerApplication.class)
                .web(WebApplicationType.SERVLET)
                .run(args);
    }
}